Optimal. Leaf size=130 \[ \frac {\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}-\frac {a^2 \csc ^6(c+d x)}{6 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc (c+d x)}{d}+\frac {b^2 \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2837, 12, 948} \[ \frac {\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}-\frac {a^2 \csc ^6(c+d x)}{6 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc (c+d x)}{d}+\frac {b^2 \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 948
Rule 2837
Rubi steps
\begin {align*} \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^7 (a+x)^2 \left (b^2-x^2\right )^2}{x^7} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac {b^2 \operatorname {Subst}\left (\int \frac {(a+x)^2 \left (b^2-x^2\right )^2}{x^7} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \operatorname {Subst}\left (\int \left (\frac {a^2 b^4}{x^7}+\frac {2 a b^4}{x^6}+\frac {-2 a^2 b^2+b^4}{x^5}-\frac {4 a b^2}{x^4}+\frac {a^2-2 b^2}{x^3}+\frac {2 a}{x^2}+\frac {1}{x}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {2 a b \csc (c+d x)}{d}-\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}+\frac {\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}-\frac {a^2 \csc ^6(c+d x)}{6 d}+\frac {b^2 \log (\sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 107, normalized size = 0.82 \[ \frac {15 \left (2 a^2-b^2\right ) \csc ^4(c+d x)-30 \left (a^2-2 b^2\right ) \csc ^2(c+d x)-10 a^2 \csc ^6(c+d x)-24 a b \csc ^5(c+d x)+80 a b \csc ^3(c+d x)-120 a b \csc (c+d x)+60 b^2 \log (\sin (c+d x))}{60 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.02, size = 183, normalized size = 1.41 \[ \frac {30 \, {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 15 \, {\left (2 \, a^{2} - 7 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 10 \, a^{2} - 45 \, b^{2} + 60 \, {\left (b^{2} \cos \left (d x + c\right )^{6} - 3 \, b^{2} \cos \left (d x + c\right )^{4} + 3 \, b^{2} \cos \left (d x + c\right )^{2} - b^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 8 \, {\left (15 \, a b \cos \left (d x + c\right )^{4} - 20 \, a b \cos \left (d x + c\right )^{2} + 8 \, a b\right )} \sin \left (d x + c\right )}{60 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 134, normalized size = 1.03 \[ \frac {60 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {147 \, b^{2} \sin \left (d x + c\right )^{6} + 120 \, a b \sin \left (d x + c\right )^{5} + 30 \, a^{2} \sin \left (d x + c\right )^{4} - 60 \, b^{2} \sin \left (d x + c\right )^{4} - 80 \, a b \sin \left (d x + c\right )^{3} - 30 \, a^{2} \sin \left (d x + c\right )^{2} + 15 \, b^{2} \sin \left (d x + c\right )^{2} + 24 \, a b \sin \left (d x + c\right ) + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.56, size = 196, normalized size = 1.51 \[ -\frac {a^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{6 d \sin \left (d x +c \right )^{6}}-\frac {2 a b \left (\cos ^{6}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}}+\frac {2 a b \left (\cos ^{6}\left (d x +c \right )\right )}{15 d \sin \left (d x +c \right )^{3}}-\frac {2 a b \left (\cos ^{6}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )}-\frac {16 a b \sin \left (d x +c \right )}{15 d}-\frac {2 a b \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5 d}-\frac {8 a b \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )}{15 d}-\frac {b^{2} \left (\cot ^{4}\left (d x +c \right )\right )}{4 d}+\frac {b^{2} \left (\cot ^{2}\left (d x +c \right )\right )}{2 d}+\frac {b^{2} \ln \left (\sin \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 108, normalized size = 0.83 \[ \frac {60 \, b^{2} \log \left (\sin \left (d x + c\right )\right ) - \frac {120 \, a b \sin \left (d x + c\right )^{5} - 80 \, a b \sin \left (d x + c\right )^{3} + 30 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} + 24 \, a b \sin \left (d x + c\right ) - 15 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.87, size = 274, normalized size = 2.11 \[ \frac {b^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {5\,a^2}{2}-12\,b^2\right )+\frac {a^2}{6}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (a^2-b^2\right )-\frac {20\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+40\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}\right )}{64\,d}-\frac {b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^2}{64}-\frac {b^2}{64}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {5\,a^2}{128}-\frac {3\,b^2}{16}\right )}{d}+\frac {5\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{48\,d}-\frac {a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{80\,d}-\frac {5\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________